<template>
  <el-card shadow="never" class="aui-card--fill">
    <div class="mod-sys__dept">
        <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
            <el-form-item>
                <el-button type="primary" @click="exportHandle()">导出</el-button>
            </el-form-item>
        </el-form>
        <el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" @sort-change="dataListSortChangeHandle" style="width: 100%" height="calc(100vh - 200px)">
            <el-table-column prop="linkName" label="姓名" align="center" :show-overflow-tooltip="true" min-width="120"></el-table-column>
            <el-table-column prop="idCode" label="身份证号" align="center" :show-overflow-tooltip="true" min-width="150"></el-table-column>
            <el-table-column prop="name" label="性别" align="center" :show-overflow-tooltip="true" min-width="120">
                <template slot-scope="scope">
                    {{scope.row.sex==1?'男':scope.row.sex==0?'女':''}}
                </template>
            </el-table-column>
            <el-table-column prop="phone" label="联系电话" align="center" width="120"></el-table-column>
            <el-table-column prop="createDate" label="报名时间" align="center" min-width="150"></el-table-column>
            <el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
                <template slot-scope="scope">
                    <!-- <el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">编辑</el-button> -->
                    <el-button type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t("delete") }}</el-button>
                </template>
            </el-table-column>
        </el-table>
        <el-pagination :current-page="page" :page-sizes="[10, 20, 50, 100]" :page-size="limit" :total="total" layout="total, sizes, prev, pager, next, jumper" @size-change="pageSizeChangeHandle" @current-change="pageCurrentChangeHandle">
        </el-pagination>
        <!-- 弹窗, 新增 / 修改 -->
        <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
        <!-- 详情 -->
        <!-- <detail ref="lookDetail" v-if="lookDetailVisible">
        </detail> -->
    </div>
  </el-card>
</template>

<script>
import mixinViewModule from "@/mixins/view-module";
import AddOrUpdate from "./notice-add-or-update";
//import detail from './detail';
export default {
  mixins: [mixinViewModule],
  data() {
    return {
      mixinViewModuleOptions: {
        createdIsNeed: false,
        getDataListURL: "/scenic/commapplication/page",
        deleteURL: "/scenic/commapplication",
        getDataListIsPage: true,
        deleteIsBatch: true,
        exportURL: "/scenic/commapplication/export",
      },
      dataForm: {
        title: '',
        id: '',
      },

    };
  },
  components: {
    AddOrUpdate,
    //  detail
  },
  methods: {
    init() {
      this.getDataList();
    }
  }

};
</script>
